<template>
    <div class="footer">
        <div>
            <input type="checkbox" @click="allcheck" :checked="ishowallcheck" />
            全选
        </div>
        <div>总价：￥{{ totalprice }}</div>
        <div :class="totalprice > 0 ? 'current' : 'jiesuan'">结算</div>
    </div>
</template>

<script>
export default {
    props: ['ishowallcheck', 'totalprice'],
    data() {
        return {};
    },
    methods: {
        allcheck() {
            // this.ishowallcheck = !this.ishowallcheck;
            this.$emit('fn');
        },
    },
};
</script>

<style lang="less" scoped>
* {
    padding: 0;
    margin: 0;
}
ul {
    list-style: none;
}
.footer {
    width: 375px;

    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
    height: 30px;
    align-items: center;
    .jiesuan {
        width: 80px;
        background-color: #ccc;
        height: 100%;
        line-height: 30px;
        text-align: center;
    }
    .current {
        width: 80px;
        background-color: #f40;
        height: 100%;
        line-height: 30px;
        text-align: center;
    }
}
</style>
